package models;

import com.alibaba.fastjson.JSONObject;

import java.util.List;
import java.util.Map;

/**
 * Created by yangxianming on 2017/3/7.
 */
public class HttpResponse {
    private int rCode;
    private Map<String, List<String>> responseHeader;  //返回头
    private String responseResult;                  //返回体

    public void setResponseResult(String responseResult) {
        this.responseResult = responseResult;
    }

    public String getResponseResult() {
        return responseResult;
    }

    public void setResponseHeader(Map<String, List<String>> responseHeader) {
        this.responseHeader = responseHeader;
    }

    public Map<String, List<String>> getResponseHeader() {
        return responseHeader;
    }

    public void setrCode(int rCode) {
        this.rCode = rCode;
    }

    public int getrCode() {
        return rCode;
    }

    public JSONObject get2json(){
        JSONObject jo = new JSONObject();
        jo.put("rCode", this.rCode);
        jo.put("body", this.responseResult);
        jo.put("responseHeader", String.valueOf(this.responseHeader));
        return jo;
    }
}
